package com.adcc.pushXml.server;//package com.adcc.pushXml.server;
//
//import org.apache.activemq.command.ActiveMQBytesMessage;
//import org.apache.activemq.command.ActiveMQTextMessage;
//import org.apache.activemq.util.ByteSequence;
//import org.springframework.jms.annotation.JmsListener;
//import org.springframework.stereotype.Component;
//
//import javax.jms.JMSException;
//import javax.jms.Message;
//
///**
// * @author LHB
// * @date 2019/12/13 17:12
// */
//@Component
//public class Test {
//
//
//    @JmsListener(destination = "changeState")
//    public void getMsg(Message message) throws JMSException {
////        ActiveMQTextMessage activeMQTextMessage= (ActiveMQTextMessage) message;
////        System.out.println(activeMQTextMessage.getText());
//        if(message instanceof ActiveMQTextMessage){
//            ActiveMQTextMessage activeMQTextMessage= (ActiveMQTextMessage) message;
//        System.out.println(activeMQTextMessage.getText());
//
//        }else if(message instanceof ActiveMQBytesMessage){
//            ActiveMQBytesMessage activeMQBytesMessage= (ActiveMQBytesMessage) message;
//            ByteSequence byteSequence= activeMQBytesMessage.getMessage().getContent();
//           byte[] data= byteSequence.getData();
//            System.out.println(new String(data));
//        }
//    }
//}
